HA$PBExportHeader$uo_dw.sru
forward
global type uo_dw from datawindow
end type
end forward

global type uo_dw from datawindow
integer width = 686
integer height = 400
string title = "none"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
event ue_seleccionarfila ( long al_fila )
end type
global uo_dw uo_dw

type variables
long il_ultimafila  
end variables

event ue_seleccionarfila(long al_fila);integer li_i

this.SetReDraw ( FALSE )

IF il_ultimafila = 0 THEN
    this.SelectRow ( al_fila, TRUE )
    Return
END IF

IF il_ultimafila > al_fila THEN
    FOR li_i = il_ultimafila to al_fila STEP -1
        this.selectrow( li_i, TRUE)
    NEXT
ELSE
    FOR li_i = il_ultimafila to al_fila
        this.selectrow( li_i, TRUE)
    NEXT
END IF

this.SetReDraw ( TRUE )
end event

on uo_dw.create
end on

on uo_dw.destroy
end on

event clicked;IF row = 0 THEN Return

IF KeyDown ( KeyShift! ) THEN
/*  El evento ue_seleccionarfila se describe en el punto 2 y 3 anteriormente */
    this.Event ue_seleccionarfila ( row )
ELSEIF KeyDown ( KeyControl! ) THEN
    IF this.GetSelectedRow ( row - 1 ) = row THEN
        this.SelectRow ( row, FALSE )
    ELSE
        this.SelectRow ( row, TRUE )
    END IF
ELSE
    this.SelectRow ( 0, FALSE )
    this.SelectRow ( row, TRUE )
END IF

//  Salva la fila a la que se hace click en la variable de instancia para usarla en ue_seleccionarfila 
il_ultimafila = row

end event

